//通过vue-router插件实现模板路由配置
import { createRouter, createWebHashHistory } from "vue-router";
const constantRoute = [
    {
        path: "/",
        component: () => import("../layout/index.vue"),
        name: "login",
        meta: {
            title: "登录", //菜单标题
        },
        redirect: "/login",
        children: [
            {
                path: "/login",
                component: () => import("../views/login/index.vue"),
                name: "Login",
                meta: {
                    title: "登录",
                },
            }
        ]
    },
]
//创建路由器
let router = createRouter({
    //路由模式hash
    history: createWebHashHistory(),
    routes: constantRoute,
});
export default router;